//
//  ModuleConnectors.m
//  CocoaSynth
//
//  Created by Thomas Dupont on 03/03/10.
//  Copyright 2010 Apple Inc. All rights reserved.
//

#import "ModuleConnectors.h"

#import "PortViewController.h"

@implementation ModuleConnectors

@synthesize ports;
@synthesize name;

- (id)initWithName:(NSString*)aName
{
	if (self = [super init]) {
		name = [aName copy];
		ports = [[NSMutableSet alloc] init];
	}
	return self;
}

- (void)dealloc
{
	[name release];
	[ports release];
	[super dealloc];
}

- (BOOL)containsPort:(PortViewController*)aPort
{
	return [ports containsObject:aPort];
}

- (void)addPort:(PortViewController*)aPort
{
	[ports addObject:aPort];
}

- (void)removePort:(PortViewController*)aPort
{
	[ports removeObject:aPort];
}

@end
